#include:
#    - base.jdk.jdk8

logstash-tar-install:
    file.managed: #cp文件到minion端
        - name: /usr/local/src/logstash-7.2.0.rpm
        - source: salt://files/logstash-7.2.0.rpm
        - user: root
        - group: root
        - mode: 644

    cmd.run: #执行本地命令
        - name: rpm -ivh  /usr/local/src/logstash-7.2.0.rpm
        - unless: rpm -q logstash
        - require:
            - file: /usr/local/src/logstash-7.2.0.rpm
